Optimal. Leaf size=168 \[ -\frac{\sqrt{a+c x^2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )}+\frac{\tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right )}{h^2 \left (a h^2+c g^2\right )^{3/2}}+\frac{f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c} h^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.234886, antiderivative size = 168, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {1651, 844, 217, 206, 725} \[ -\frac{\sqrt{a+c x^2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )}+\frac{\tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right )}{h^2 \left (a h^2+c g^2\right )^{3/2}}+\frac{f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c} h^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1651
Rule 844
Rule 217
Rule 206
Rule 725
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2}{(g+h x)^2 \sqrt{a+c x^2}} \, dx &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac{\int \frac{-c d g+a f g-a e h-f \left (\frac{c g^2}{h}+a h\right ) x}{(g+h x) \sqrt{a+c x^2}} \, dx}{c g^2+a h^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac{f \int \frac{1}{\sqrt{a+c x^2}} \, dx}{h^2}+\frac{\left (c d g-2 a f g-\frac{c f g^3}{h^2}+a e h\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{c g^2+a h^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac{f \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{h^2}-\frac{\left (c d g-2 a f g-\frac{c f g^3}{h^2}+a e h\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{c g^2+a h^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) \sqrt{a+c x^2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac{f \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{\sqrt{c} h^2}-\frac{\left (c d g-2 a f g-\frac{c f g^3}{h^2}+a e h\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{\left (c g^2+a h^2\right )^{3/2}}\\ \end{align*}
Mathematica [A] time = 0.418786, size = 218, normalized size = 1.3 \[ \frac{-\frac{h \sqrt{a+c x^2} \left (h (d h-e g)+f g^2\right )}{(g+h x) \left (a h^2+c g^2\right )}+\frac{\log \left (\sqrt{a+c x^2} \sqrt{a h^2+c g^2}+a h-c g x\right ) \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right )}{\left (a h^2+c g^2\right )^{3/2}}+\frac{\log (g+h x) \left (a h^2 (e h-2 f g)+c \left (d g h^2-f g^3\right )\right )}{\left (a h^2+c g^2\right )^{3/2}}+\frac{f \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right )}{\sqrt{c}}}{h^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.249, size = 923, normalized size = 5.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d + e x + f x^{2}}{\sqrt{a + c x^{2}} \left (g + h x\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]